﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ExperimentUpon.Util;
using NHibernate;
using ExperimentUpon.Service;
using ExperimentUpon.VO;
using ExperimentUpon.Service.Exception;

namespace Test
{
    class Program
    {
        static void Main(string[] args)
        {
            string account = "zzm";
            string password = "123";
            IUserService service = ServiceFactory.GetService<IUserService>();
            try
            {
                User user = service.login(account, password);
            }
            catch (BaseException e)
            {
                Exception exp = e;
                while (exp != null)
                {
                    Console.WriteLine(exp.Message);
                    Console.WriteLine("key:" + e.Key);
                    Console.WriteLine(exp.StackTrace);
                    exp = exp.InnerException;
                }
            }
            Console.ReadKey();
        }
    }
}
